After completing this lesson, you’ll be able to:
FME Server has a model-driven architecture because its processes are expressed as models. In FME, these models are better known as workspaces.
Workspaces are created – we call it “authored” – using FME Desktop. In particular, the FME Workbench application is used. FME Workbench is a client of FME Server, and so they form a client-server pair. However, both share the same core engine and process data in the same way.
Because FME Workbench is a client of FME Server, it may be used to transfer authored workspaces to and from FME Server. We call this transfer publishing.
FME Workbench has the ability to:
The ability to transfer a workspace back to FME Workbench means workspaces can be downloaded for editing and maintenance, then published back to FME Server.
Workspaces are stored on FME Server in devices called repositories. Each FME Server may have multiple repositories, but any workspace can only belong to one of them, without creating a duplicated workspace.
A repository consists of two parts:
1) The .fmw files from any workspaces that have been published to FME Server are stored in the file-based part of the repository.
2) Metadata related to the workspace is held separately in the FME Server Database. This metadata includes information about the contents of the workspace; for example, source and destination datasets, workspace feature types, and published parameters.
Repositories are managed by the FME Core. They can be accessed (by authors and administrators) through the FME Server Web Interface.
The functionality for publishing or downloading workspaces is accessed in FME Workbench either through the menubar:
... the toolbar:
... or the Start Tab:
Workspaces can also be uploaded and downloaded directly through FME Server on the Workspaces page:
The Publish to FME Server tool in FME Workbench opens a simple wizard interface, the first dialog of which defines a connection to FME Server.
Adding a web connection opens a dialog with fields in which to define connection credentials. These connection details are saved so that they can be reused in the future simply by picking from the drop-down list:
The next dialog defines the repository in which to store the workspace:
Either an existing repository can be used, or a new one created. The workspace name can also be edited, even making it different to what it is saved as locally.
This dialog only appears when there are databases and/or web connections that need to be uploaded with the workspace.
This workspace contains both a database connection and a web connection that need to be uploaded to function on FME Server. Note that the Dropbox OAuth web connection needs the service to be added to FME Server, and will also require additional authentication before FME Server will be able to use it.
The database connection requires no further authentication, but care must be taken not to accidentally overwrite an existing database connection with the same name that might already be defined on FME Server.
The final dialog defines which service(s) the workspace is to be registered against. A workspace may be registered for use with any number of these services.
The Job Submitter service allows FME Server to run a workspace as-is. This is the closest to running a workspace in FME Workbench. All inputs and outputs are defined in the workspace, so data is simply written out and not streamed or delivered in any other manner.
Job submission is ideal for testing workspaces, writing to databases, and for running large-scale and batch translations that make use of the server process queue.
Once a workspace has been published, the republish tool becomes active. Further updates to the workspace (within the same FME Workbench session) can then be uploaded with a single click.
The same parameters are used as before. If changes need to be made to these parameters, then the full publishing wizard should be used.
Workbench can also download a workspace held in an FME Server repository. This is usually done in order to make edits to the workspace. Note that downloaded workspaces are copies of the original, which remains in the FME Server repository.
The downloading wizard begins with the same connection dialog as the publishing wizard. From there, the second – and final – dialog page is a repository and workspace selection tool:
The user is then prompted for a location to save the workspace. The default (on Windows) is <User>\Documents\FME\Workspaces. The workspace and any resources are then downloaded and saved to that location.
Once downloaded, the workspace is automatically opened within FME Workbench for editing.
When the source data for a translation is stored as files (rather than a feed or database), it is possible to publish data to an FME Server repository along with the workspace.
In this workspace the source dataset is MapInfo TAB:
A MapInfo TAB dataset is made up of a series of files (.tab, .dat, .id, .map). When this workspace is published the wizard allows us to publish the data files alongside it by simply checking the box labeled Upload data files.
FME automatically selects the files to upload based on what it thinks is necessary to run the translation. If there are other files you wish to upload, or files FME selected that you don't wish to upload, the Select Files button allows you to make changes:
This dialog also allows you to change where the files are published, but for now, we'll ignore that setting and go with the default of publishing to the repository.
Once the publishing wizard is complete, those files are uploaded to FME Server and tagged for use with this workspace.